Skip to content

refactor: Unified framework generator structure#23

Draft
AnouarMohamed wants to merge 2 commits into
yss-ef:mainfrom
AnouarMohamed:feature/refactor-generators
Draft

refactor: Unified framework generator structure#23
AnouarMohamed wants to merge 2 commits into
yss-ef:mainfrom
AnouarMohamed:feature/refactor-generators

Conversation

@AnouarMohamed

Copy link
Copy Markdown
Collaborator

Closes #17.

This PR implements a major architectural improvement to how generators are organized:

  • Framework-specific Packages: Generators are now grouped by framework (e.g., devctl/generators/angular/), making the structure intuitive.
  • Logical Separation: Initialization (project creation) and Scaffolding (resource injection) are now split into init.py and scaffold.py within each package.
  • DRY Templates: Centralized Jinja2 setup in devctl/utils/templates.py removes redundant path calculations and configuration.
  • Standardized API: Framework packages expose their primary functions via __init__.py, simplifying imports across the CLI.

- Restructured generators/ into framework-specific packages (angular, spring, vue)
- Split initialization and scaffolding logic into separate init.py and scaffold.py
- Centralized Jinja2 environment management in devctl/utils/templates.py
- Exposed core generator functions in framework-level __init__.py files
- Updated all internal imports and tests to match the new structure
@AnouarMohamed AnouarMohamed changed the title Refactor: Unified framework generator structure refactor: Unified framework generator structure May 25, 2026
Comment thread devctl/utils/templates.py
Comment on lines +15 to +20
return Environment(
loader=FileSystemLoader(str(template_path)),
trim_blocks=True,
lstrip_blocks=True,
keep_trailing_newline=True
)
Comment thread devctl/utils/templates.py Fixed
@AnouarMohamed AnouarMohamed marked this pull request as draft May 25, 2026 12:16
Comment thread devctl/utils/templates.py
@@ -0,0 +1,21 @@
import os
@AnouarMohamed AnouarMohamed assigned Copilot and unassigned Copilot May 25, 2026
@AnouarMohamed

Copy link
Copy Markdown
Collaborator Author

@copilot fix ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: Consolidate and standardize generator logic

3 participants